Silk Mobile

Table of Contents (Homepage)

Mobile Key Events

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

images/images/os-icons/os_blackberry_150x150.png

Description

"SendText" can also be used for sending key events to mobile devices.

By key events we mean the physical button of the devices.

Scenario: In the following example, we will use the key event {HOME} to simulate pressing the home key of the device.

Lets say eribank app is launched on the device. As we execute the command SendText{HOME}, the device will go to the home screen of the device.

Parameters

Parameters:

  • Text: Valid key event for the mobile device.

Usage

If you are writing scripts using a real external device, you can simulate key events using the SendText( Text) command.

Here, we are using {HOME} key event to send the device screen to home screen

Screenshot before

executing SendText({HOME}

Screenshot after

executing SendText({HOME}

images/download/attachments/3309687/12.jpg

images/download/attachments/3309687/13.jpg

Code Examples

Java Example
client.sentText("{HOME}")
C# Example
client.sentText("{HOME}")
VBScript Example
client.sentText "{HOME}"
Report
Python Example
self.client.sentText("{HOME}")
Perl Example
$client->sendText("{HOME}")